Skip to main content
GET
/
v4
/
knowledge_graph
/
neo4j
/
graph
/
Get Knowledge Graph
curl --request GET \
  --url https://rag-prod.studio.lyzr.ai/v4/knowledge_graph/neo4j/graph/ \
  --header 'x-api-key: <api-key>'
{
  "nodes": [
    {
      "id": "<string>",
      "label": "<string>",
      "properties": {}
    }
  ],
  "edges": [
    {
      "id": "<string>",
      "source": "<string>",
      "target": "<string>",
      "type": "<string>",
      "properties": {}
    }
  ],
  "metadata": {}
}

Authorizations

x-api-key
string
header
required

Query Parameters

rag_id
string
required

The unique identifier (ID) of the RAG system to retrieve the graph for.

Example:

"654c602a46c3b6d4e28741b0"

limit
integer
default:50

Maximum number of nodes to return to control the visualization size.

Required range: x >= 1

Response

Knowledge graph data successfully retrieved.

The data structure containing nodes and edges for graph visualization.

nodes
object[]
edges
object[]
metadata
object

Additional metadata about the graph (e.g., total count, query time).